﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CoHSIN.Models.PageTab>" %>

<!-- Vertival Nav -->
<div id="divVerticalNav">
<%--    --%>
    <ul id="ulVerticalNav">
    <% 
        foreach (CoHSIN.Models.Tab Tab in Model.Page.Tabs)
        {
            Response.Write(@"
                            <li tabname='" + Tab.TabName.ToLower().Trim() + "'>"
                            + Html.RouteLink(Tab.TabLabel, "PageTabRoute",
                                new RouteValueDictionary { { "page", Model.Page.PageName.Trim() }, { "tab", Tab.TabName.Trim() } })
                            + "</li>");
                                
        }

        if (CoHSIN.Globals.isAdmin)
        {
            Response.Write("<li tabname='_newtab' class='new'>Add Tab</li>");
        }
        %>

    </ul>
</div>


<script type="text/javascript">
    Site.selectedTab = "<%= Model.Tab.TabName.ToLower().Trim() %>";
</script>